package se.thoka.twt.client.form;

import com.google.gwt.core.client.GWT;
import com.google.gwt.resources.client.ClientBundle;
import com.google.gwt.resources.client.CssResource;
import com.google.gwt.resources.client.CssResource.Shared;

public class TWTFormFieldResources {

	private static Bundle bundle;
	
	interface Bundle extends ClientBundle {
		@Source("TWTFormField.css")
		Style style();
	}
	
	@Shared
	interface Style extends CssResource {
		String twtFormField();
		String twtFormFieldInvalid();
		String twtFormFieldDisabled();
		
		String twtTextBox();
	}
	
	public static Style getStyle() {
		if (bundle == null) {
			bundle = GWT.create(Bundle.class);
		}
		
		return bundle.style();
	}
	
	public static void ensureStyle() {
		getStyle().ensureInjected();
	}
}
